Optimal. Leaf size=202 \[ -\frac{\left (a+\frac{b}{x}\right )^{n+1} (2 a c-b d n) \, _2F_1\left (1,n+1;n+2;\frac{b}{a x}+1\right )}{a^2 d^3 (n+1)}+\frac{c^2 \left (a+\frac{b}{x}\right )^{n+1} (2 a c-b d (2-n)) \, _2F_1\left (1,n+1;n+2;\frac{c \left (a+\frac{b}{x}\right )}{a c-b d}\right )}{d^3 (n+1) (a c-b d)^2}+\frac{c (2 a c-b d) \left (a+\frac{b}{x}\right )^{n+1}}{a d^2 \left (\frac{c}{x}+d\right ) (a c-b d)}+\frac{x \left (a+\frac{b}{x}\right )^{n+1}}{a d \left (\frac{c}{x}+d\right )} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.622069, antiderivative size = 202, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35 \[ -\frac{\left (a+\frac{b}{x}\right )^{n+1} (2 a c-b d n) \, _2F_1\left (1,n+1;n+2;\frac{b}{a x}+1\right )}{a^2 d^3 (n+1)}+\frac{c^2 \left (a+\frac{b}{x}\right )^{n+1} (2 a c-b d (2-n)) \, _2F_1\left (1,n+1;n+2;\frac{c \left (a+\frac{b}{x}\right )}{a c-b d}\right )}{d^3 (n+1) (a c-b d)^2}+\frac{c (2 a c-b d) \left (a+\frac{b}{x}\right )^{n+1}}{a d^2 \left (\frac{c}{x}+d\right ) (a c-b d)}+\frac{x \left (a+\frac{b}{x}\right )^{n+1}}{a d \left (\frac{c}{x}+d\right )} \]
Antiderivative was successfully verified.
[In] Int[((a + b/x)^n*x^2)/(c + d*x)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 85.6146, size = 155, normalized size = 0.77 \[ \frac{c^{2} \left (a + \frac{b}{x}\right )^{n + 1} \left (2 a c + b d n - 2 b d\right ){{}_{2}F_{1}\left (\begin{matrix} 1, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{c \left (a + \frac{b}{x}\right )}{a c - b d}} \right )}}{d^{3} \left (n + 1\right ) \left (a c - b d\right )^{2}} + \frac{c \left (a + \frac{b}{x}\right )^{n + 1} \left (2 a c - b d\right )}{a d^{2} \left (a c - b d\right ) \left (\frac{c}{x} + d\right )} + \frac{x \left (a + \frac{b}{x}\right )^{n + 1}}{a d \left (\frac{c}{x} + d\right )} - \frac{\left (a + \frac{b}{x}\right )^{n + 1} \left (2 a c - b d n\right ){{}_{2}F_{1}\left (\begin{matrix} 1, n + 1 \\ n + 2 \end{matrix}\middle |{1 + \frac{b}{a x}} \right )}}{a^{2} d^{3} \left (n + 1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b/x)**n*x**2/(d*x+c)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.13735, size = 0, normalized size = 0. \[ \int \frac{\left (a+\frac{b}{x}\right )^n x^2}{(c+d x)^2} \, dx \]
Verification is Not applicable to the result.
[In] Integrate[((a + b/x)^n*x^2)/(c + d*x)^2,x]
[Out]
_______________________________________________________________________________________
Maple [F] time = 0.06, size = 0, normalized size = 0. \[ \int{\frac{{x}^{2}}{ \left ( dx+c \right ) ^{2}} \left ( a+{\frac{b}{x}} \right ) ^{n}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b/x)^n*x^2/(d*x+c)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (a + \frac{b}{x}\right )}^{n} x^{2}}{{\left (d x + c\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^n*x^2/(d*x + c)^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{x^{2} \left (\frac{a x + b}{x}\right )^{n}}{d^{2} x^{2} + 2 \, c d x + c^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^n*x^2/(d*x + c)^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b/x)**n*x**2/(d*x+c)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (a + \frac{b}{x}\right )}^{n} x^{2}}{{\left (d x + c\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^n*x^2/(d*x + c)^2,x, algorithm="giac")
[Out]